<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%article_cate}}".
 *
 * @property integer $id
 * @property string $name
 * @property integer $parent_cate
 * @property integer $cate
 * @property integer $type
 * @property integer $weight
 * @property integer $status
 * @property string $created_at
 * @property string $updated_at
 * @property string $res1
 * @property string $res2
 * @property string $res3
 */
class ArticleCate extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%article_cate}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'parent_cate'], 'required'],
            [['parent_cate', 'cate', 'type', 'weight', 'status', 'created_at', 'updated_at'], 'integer'],
            [['name'], 'string', 'max' => 40],
            [['res1', 'res2', 'res3'], 'string', 'max' => 80],

        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '名字',
            'parent_cate' => '父级分类',
            'cate' => '文章/平台',
            'type' => 'Type',
            'weight' => 'Weight',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'res1' => 'Res1',
            'res2' => 'Res2',
            'res3' => 'Res3',
        ];
    }
}
